WO-A-98/145745 discloses a method for determining a height of a number of spatial positions of a sample. In the method, three or more images have to be taken in every scanning position. The plurality of images is needed to reconstruct an intensity signal over a full width of a pattern so that an amplitude can be calculated for said scanning position. However, due to the need to make multiple images in each of the scanning positions, the scanning movement must stop to make the images at each of the scanning positions. This not only interrupts the scanning movement, but also takes a considerable time, thereby lengthening the process time.